package com.xydtech.busiflw.mapper;

import com.xydtech.busiflw.domain.BusiflInstStep;

import java.util.List;
import java.util.Map;

/**
 * 业务流转步骤Mapper接口
 *
 * @author JHON
 * @date 2021-06-11
 */
public interface BusiflInstStepMapper {
    /**
     * 查询业务流转步骤
     *
     * @param tracestepId 业务流转步骤ID
     * @return 业务流转步骤
     */
    public BusiflInstStep selectBusiflInstStepById(Long tracestepId);

    /**
     * 查询业务流转步骤列表
     *
     * @param busiflInstStep 业务流转步骤
     * @return 业务流转步骤集合
     */
    public List<BusiflInstStep> selectBusiflInstStepList(BusiflInstStep busiflInstStep);

    /**
     * 查询业务流转审批列表
     *
     * @param busiflInstStep 业务流转步骤
     * @return 业务流转步骤集合
     */
    public List<BusiflInstStep> selectBusiflInstApproveList(BusiflInstStep busiflInstStep);

    /**
     * 查询关联步骤审批人
     *
     * @param busiflInstStep 业务流转步骤
     * @return 业务流转步骤集合
     */
    public List<BusiflInstStep> selectcorrelationUserList(BusiflInstStep busiflInstStep);

    /**
     *查询自定义SQL审批人
     * @Title: selectDefineSqlUserList
     * @param map
     * @return java.util.List<java.lang.Long>
     * @exception
     * @author JHON
     * @Date 2021/12/2 10:43
     **/
    public List<Long> selectDefineSqlUserList(Map<String, Object> map);

    /**
     *查询流程步骤节点跳过条件判断结果
     * @Title: selectStepSkipResult
     * @param map
     * @return boolean
     * @exception
     * @author JHON
     * @Date 2021/12/2 11:14
     **/
    public boolean selectStepSkipResult(Map<String, Object> map);

    /**
     * 新增业务流转步骤
     *
     * @param busiflInstStep 业务流转步骤
     * @return 结果
     */
    public int insertBusiflInstStep(BusiflInstStep busiflInstStep);

    /**
     * 修改业务流转步骤 -任务抢先
     *
     * @param busiflInstStep 业务流转步骤
     * @return 结果
     */
    public int updateBusiflInstStep(BusiflInstStep busiflInstStep);

    /**
     * 修改业务流转步骤-任务并发
     *
     * @param busiflInstStep 业务流转步骤
     * @return 结果
     */
    public int updateBusiflInstStepByUser(BusiflInstStep busiflInstStep);

    /**
     * 删除业务流转步骤
     *
     * @param tracestepId 业务流转步骤ID
     * @return 结果
     */
    public int deleteBusiflInstStepById(Long tracestepId);

    /**
     * 批量删除业务流转步骤
     *
     * @param tracestepIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteBusiflInstStepByIds(String[] tracestepIds);

    /**
     * 删除业务流转步骤
     *
     * @param instanceId 业务实例ID
     * @return 结果
     */
    public int deleteBusiflInstStepByInstanceId(String instanceId);

}
